package com.lhb.boyixue.user.service.impl;

import com.lhb.boyixue.user.mapper.CaseAnalysisMapper;
import com.lhb.boyixue.user.mapper.ComprehensiveKnowledgeMapper;
import com.lhb.boyixue.user.mapper.PaperMapper;
import com.lhb.boyixue.user.mapper.PracticeExercisesMapper;
import com.lhb.boyixue.user.model.Case;
import com.lhb.boyixue.user.model.Paper;
import com.lhb.boyixue.user.model.PracticeExercisesModel;
import com.lhb.boyixue.user.model.Question;
import com.lhb.boyixue.user.service.ExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 86131
 * @version 1.0
 * @description
 * @date 2025/6/25 下午11:28
 */
@Service
public class ExamServiceImpl implements ExamService {

    @Autowired
    ComprehensiveKnowledgeMapper comprehensiveKnowledgeMapper;
    @Autowired
    CaseAnalysisMapper caseAnalysisMapper;
    @Autowired
    PaperMapper paperMapper;
    @Autowired
    PracticeExercisesMapper practiceExercisesMapper;

    @Override
    public List<Question> comprehensive(String title, String year) {


        return comprehensiveKnowledgeMapper.createQuestion(title, year);
    }

    @Override
    public List<Case> caseAnalysis(String title, String year) {
        return caseAnalysisMapper.createCase(title, year);
    }

    @Override
    public List<Paper> paper(String title, String year) {
        return paperMapper.selectAllPaper(title, year);
    }

    @Override
    public List<Question> practise() {

        return comprehensiveKnowledgeMapper.practise();
    }

    @Override
    public List<PracticeExercisesModel> practiceExercises(String category) {


        return practiceExercisesMapper.getCategory(category);
    }
}
